<?php

class CCellImage {
    //put your code here
    private  $m_nHeight;
    private  $m_nWidth;
    private  $m_idProduct;
    private  $m_nXImage;
    private  $m_nYImage;
    private  $m_fScale;
    
    private $m_sTitle;
    
    private $m_sPath;
    
    private $m_bCheck;
    
    public function setsource($sPath)
    {
        $this->m_sPath = $sPath;
    }
    
    public function setcheck($bcheck)
    {
        $this->m_bCheck = $bcheck;
    }
    public function setHeight($nHeight)
    {
        $this->m_nHeight = $nHeight;
    }
    
    public function setWidth($nWidth)
    {
        $this->m_nWidth = $nWidth;
    }
    
    public function setIdProduct($sId)
    {
        $this->m_idProduct = $sId;
        //Get more infomation not image
        
    }
    public function setXImage($nXImage)
    {
        $this->m_nXImage = $nXImage;
    }
    public function setYImage($nYImage)
    {
        $this->m_nYImage = $nYImage;
    }
    
    public function setScaleThumbnail($dScale)
    {
        $this->m_fScale = $dScale;
    }

    public function show()
    {
        
        $closeDiv = '</div>';              
        echo'<div class ="cell" style="width: 120px;margin:1px;">'; 
        
        echo '<div style="float:left;width:25px;">';
        if($this->m_bCheck)
            echo '<input type="checkbox" name="show" checked>';
        else 
           echo '<input type="checkbox" name="show">'; 
        
        echo '</div>';
        
        echo '<div style="float:left; width:150px;">';                
        $sourceImg = '<img src="http://localhost/Trip2VietNam/'.  $this->m_sPath.'" width=120 height =120 />';         
        echo $sourceImg;  
        echo '</div>';
        
        
        echo $closeDiv;       
    }
       
    public function showTitle()
    {  
        echo '<div>';
        echo 'abc';
        echo '</div>';
    }
}
?>
